# define RESPONSE_CODE
class ERRORCODE:
    RESPONSE_SUCCESS = "0"
    REQUEST_ERROR = "1000"
    REQUEST_DATAFORMATION_ERROR        = "1001"
    REQUEST_UNAUTHORIZATION_ERROR      = "1002"
    REQUEST_NOT_FOUND_ERROR            = "1003"
    REQUEST_USERNAME_OR_PASSWORD_ERROR = "1004"
    REQUEST_ORDER_TIME_INCORRECT       = "1005"
    REQUEST_TIME_HAVE_BEEN_ORDER       = "1006"
    REQUEST_USERNAME_ALREADY_EXIST       = "1007"
    REQUEST_USERNICKNAME_ALREADY_EXIST   = "1008"
    REQUEST_SIGNATRUE_ERROR   = "1009"
    REQUEST_GROUPNAME_ALREADY_EXIST   = "1010"
    REQUEST_HAVE_NO_PERMISSION  = "1011"
    RESPONSE_ERROR = "2000"
    RESPONSE_SERVER_ERROR             = "2001"
    RESPONSE_DATABASE_ERROR           = "2002"
    RESPONSE_DATABASE_OPERATION_ERROR = "2003"
    RESPONSE_REDIRECT_LOGIN = "2004"
    UNKNOWN_ERROR = "3000"

# Config mapped response message
RESPONSE_MESSAGE = {
	"0":    "success",
	"1000": "request error",
	"1001": "request data formation error",
	"1002": "request authentication error",
	"1003": "request not fund error",
	"1004": "request username or password error",
	"1005": "request order time incorrect",
	"1006": "request time have been ordered",
    "1007": "the username already exists",
    "1008": "the nickname already exists",
    "1009": "the signature is wrong or expired",
    "1010": "the group name is already exist",
    "1011": "have no permission",
	"2000": "response error",
	"2001": "response server error",
	"2002": "response database connect error",
	"2003": "response database operation error",
    "2004": "have not login",
	"3000": "unknown error",
}


__all__ = [ERRORCODE, RESPONSE_MESSAGE]